// buffer 与字符串转换
let buf_4 = Buffer.from([105, 108, 111, 118, 101, 121, 111, 117]);

// console.log(buf_4.toString());//utf-8转码

//[]
// let buf = Buffer.from('hello');
// console.log(buf[1].toString(2))//01100101
// buf[0] = 95;
// console.log(buf.toString());

// 溢出 (超出部分二进制保留后八位)
// let buf = Buffer.from('hello');
// buf[0] = 361;
// console.log(buf.toString());

//中文(utf-8一个中文占三个字节)
let buf = Buffer.from('你好');
console.log(buf) 